// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "MyLoginWidget.generated.h"

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FLoginGameStart);

/**
 * 
 */
UCLASS()
class MYPROJECT2_API UMyLoginWidget : public UUserWidget
{
	GENERATED_BODY()
	
	UPROPERTY(meta = (BindWidget))
	class UButton* Button_0;

	UPROPERTY(meta = (BindWidget))
	class UEditableTextBox* UserName;

	UPROPERTY(meta = (BindWidget))
	class UEditableTextBox* PassWord;

	UPROPERTY(meta = (BindWidget))
	class UTextBlock* Result_Show;

	UPROPERTY(meta = (BindWidget))
	class UImage* BackGround;
	
	// Bind Button Onclicked Events
	virtual void NativeConstruct() override;
	
public:
	UPROPERTY(BlueprintAssignable, Category = "Events")
	FLoginGameStart LoginGameStart;

private:
	UFUNCTION()
	void OnLoginClicked();

	void SetFullScreenImage(UTexture2D* backgroundTexture);

	// Hard Code UserName And PassWord
	const FString HardCodeUserName = TEXT("Hamster");
	const FString HardCodePassWord = TEXT("Hamster");
};
